<?php
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
// DLMan by Shedd Technologies International		  				//
// http://www.dlman.com | info@dlman.com							//
// Copyright 2003 by STI, All rights reserved.						//
// ---------------------------------------------------------------- //
// Usage of this software is governed by the terms of GPL. 	    	//
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//

require_once("global.php");
ob_start();//start content buffer
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
//summary statistics for the present user
$sql="SELECT ".$config->field['lastactivity']." FROM ".$config->dt['user']." WHERE ".$config->field['username']."='".$HTTP_SESSION_VARS["Muser"]."'";
$result=mysql_query($sql);
$value=mysql_fetch_array($result);
$last_active=$value[$config->field['lastactivity']];
//check for updates
$sql="SELECT * FROM ".$config->dt['files']." WHERE fileupdate_timestamp>'$last_active'";
$result=mysql_query($sql);
$recent=mysql_num_rows($result);
//pull sales department address
$sql="SELECT sales_address FROM ".$config->dt['settings']."";
$result=mysql_query($sql);
$value=mysql_fetch_array($result);
$sales=$value['sales_address'];
?>
<P><STRONG><FONT face=Verdana size=2>Welcome <?php print $account; ?>!</FONT></STRONG></P>
<P><?php print $recent; ?> products have been updated since your last login.</P>
<?php
//update last activity
$sql="UPDATE ".$config->dt['user']." SET ".$config->field['lastactivity']."='".time()."' WHERE ".$config->field['username']."='".$HTTP_SESSION_VARS["Muser"]."'";
$result=mysql_query($sql);
if(!$result) print "<!--Unable to update last activity! -- $sql -- ".mysql_error()."-->";
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
$content=ob_get_contents();//store content to global buffer var
ob_end_clean();
?>